import request from '@/router/axios';

//获取所有已经跟分销关联起来的商品
export const getAllList = (settingType) => {
    return request({
        url: '/dis/goodsRelation/listAll',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            settingType:settingType
        }
    })
}

//获取所有的商品
export const getAllListGoods = (page, size, params) => {
    return request({
        url: '/base/sellerGoods/list',
        method: 'post',
        params: {
            ...params,
            page,
            size,
        }
    })
}

export const commitEdit = (passData) => {
    return request({
        url: '/dis/storeSetting/editItem',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: passData
    })
}

export const getDetail = (settingType) => {
    return request({
        url: '/dis/storeSetting/detail',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            settingType:settingType
        }
    })
}

